<div>
	{% if not corporas or not codebooks %}
		{% if not corporas %}	
		<div class="highlight ui-state-highlight">You need at least one active Corpora in the project to create a task</div>
		{% else %}
		<div class="highlight ui-state-highlight">You need at least one active Codebook in the project to create a task</div>
		{% endif %}
	{% else %}
	<form action="/new/task/?pid={{ project.id }}" method="POST">
		<div class='formfieldcontainer'>
                        <label class="fieldlabel" style="width:130px;">Task name :</label>
                	<input name="name" required="required" />
		</div>

		<div class='formfieldcontainer'>
			<label class="fieldlabel" style="width:130px;">Select Corpora :</label>
			<select name='corpora'>
				{% for corpora in corporas %}
				<option value="{{ corpora.id }}">{{ corpora.name }}</option>
				{% endfor %}
			</select>
		</div>
	
		<div class='formfieldcontainer'>
			<label class="fieldlabel" style="width:130px;">Select Codebook :</label>
                        <select name='codebook'>
                                {% for codebook in codebooks %}
                                <option value="{{ codebook.id }}">{{ codebook.name }}</option>
                                {% endfor %}
                        </select>
		</div>
		
		<div class='formfieldcontainer'>
			<label class="fieldlabel" style="width:130px;">Select User :</label>
                        <select name='user'>
                                {% for u in users %}
                                <option value="{{ u.user.id }}">{{ u.user.firstname }} {{ u.user.lastname }}</option>
                                {% endfor %}
                        </select>
		</div>

		<div class='formfieldcontainer'>
                        <label class="fieldlabel" style="width:130px;">Start Doc index :</label>
                	<input type='text' style='width:50px;' name='min' />
		</div>
		<div class='formfieldcontainer'>
                        <label class="fieldlabel" style="width:130px;">End Doc index :</label>
                        <input type='text' style='width:50px;' name='max' />
		</div>

		<div class='formfieldcontainer'>
			<input type="submit" value="Create" class="button-base button-blue button-small" style="margin-left:50px;" />
		</div>
	</form>
	{% endif %}
</div>
